import Database

database_address = "Database/Data.db"

def add_score(score):
    # 读取账户信息
    account_data_list = Database.read_data_to_list(database_address, "account")
    account_data = account_data_list[0]
    # 列表转化为信息
    account_id = account_data[0]
    old_score = account_data[3]
    # 增加积分
    new_score = old_score + score
    # 保存数据
    Database.modify_data(database_address, "account", "score", new_score, account_id)


def menu():
    while True:
        menu_list = []

        # 读取账户信息
        account_data_list = Database.read_data_to_list(database_address, "account")
        account_data = account_data_list[0]

        print(f"账户id：{account_data[0]}")
        print(f"账户名称：{account_data[1]}")
        print(f"积分：{account_data[3]}")
